<?php
require_once($_SERVER['DOCUMENT_ROOT'] . "/defaultconf.mex");
if (!isset($_POST['TimeStart'])) {
    $_POST['TimeStart'] = date("Y-m-d");
    $_POST['TimeEnd'] = date("Y-m-d");
}
form_pr('Gather_clients', '', '', 'post');
echo '<div class="title">Resultado Trabalho Comercial | Periodo: ';
mn_field('date', 'ED', 'TimeStart', '', 'Gather_clients', '8', '', '');
mn_field('date', 'ED', 'TimeEnd', '', 'Gather_clients', '8', '', '');
mn_field('hselect','ED','cmrReport',1,'Actividade de Comerciais;Conhecimento;teste;teste;teste#1;2;3;4;5','','','');
mn_field('button', 'ED', 'Consult', 'Consultar', '', '', '', '" onclick="
                if(document.getElementById(\'cmrReport\').options[document.getElementById(\'cmrReport\').selectedIndex].value==1){
		document.Gather_clients.action=\'_response/call.php?get=Comercial/report_ComercialAngariar\';
                }else if(document.getElementById(\'cmrReport\').options[document.getElementById(\'cmrReport\').selectedIndex].value==2){
		document.Gather_clients.action=\'_response/call.php?get=Comercial/report_conhecimentoclient\';
                }else if(document.getElementById(\'cmrReport\').options[document.getElementById(\'cmrReport\').selectedIndex].value==3){
		document.Gather_clients.action=\'_response/call.php?get=Comercial/report_comercialclient\';
                }else if(document.getElementById(\'cmrReport\').options[document.getElementById(\'cmrReport\').selectedIndex].value==4){
		document.Gather_clients.action=\'_response/call.php?get=Comercial/report_promocionalclient\';
                }else if(document.getElementById(\'cmrReport\').options[document.getElementById(\'cmrReport\').selectedIndex].value==5){
		document.Gather_clients.action=\'_response/call.php?get=Comercial/report_geographicclient\';
                }
		subform(\'Gather_clients\',\'BoardPanel\');');
echo '
</div></form>
<div id="BoardPanel"></div>';
